import React from "react";
// import React from "./react";

class Counter extends React.Component{
  constructor(props){
    super(props)
    this.state = {
      x:0,
      y:0
    }
  }
  handle = (event)=>{
    this.setState({
      x:event.clientX,
      y:event.clientY
    })
  }
   
    render(){
      return (
        <div onMouseMove={this.handle}>
          {this.props.render(this.state)}
        </div>
      );
    }
}


export default Counter